\(\int \frac {a+b \log (c (d+e x)^n)}{(f+g x)^4} \, dx\) [43]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F(-2)]
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 22, antiderivative size = 141 \[ \int \frac {a+b \log \left (c (d+e x)^n\right )}{(f+g x)^4} \, dx=\frac {b e n}{6 g (e f-d g) (f+g x)^2}+\frac {b e^2 n}{3 g (e f-d g)^2 (f+g x)}+\frac {b e^3 n \log (d+e x)}{3 g (e f-d g)^3}-\frac {a+b \log \left (c (d+e x)^n\right )}{3 g (f+g x)^3}-\frac {b e^3 n \log (f+g x)}{3 g (e f-d g)^3} \]

[Out]

1/6*b*e*n/g/(-d*g+e*f)/(g*x+f)^2+1/3*b*e^2*n/g/(-d*g+e*f)^2/(g*x+f)+1/3*b*e^3*n*ln(e*x+d)/g/(-d*g+e*f)^3+1/3*(
-a-b*ln(c*(e*x+d)^n))/g/(g*x+f)^3-1/3*b*e^3*n*ln(g*x+f)/g/(-d*g+e*f)^3

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {2442, 46} \[ \int \frac {a+b \log \left (c (d+e x)^n\right )}{(f+g x)^4} \, dx=-\frac {a+b \log \left (c (d+e x)^n\right )}{3 g (f+g x)^3}+\frac {b e^3 n \log (d+e x)}{3 g (e f-d g)^3}-\frac {b e^3 n \log (f+g x)}{3 g (e f-d g)^3}+\frac {b e^2 n}{3 g (f+g x) (e f-d g)^2}+\frac {b e n}{6 g (f+g x)^2 (e f-d g)} \]

[In]

Int[(a + b*Log[c*(d + e*x)^n])/(f + g*x)^4,x]

[Out]

(b*e*n)/(6*g*(e*f - d*g)*(f + g*x)^2) + (b*e^2*n)/(3*g*(e*f - d*g)^2*(f + g*x)) + (b*e^3*n*Log[d + e*x])/(3*g*
(e*f - d*g)^3) - (a + b*Log[c*(d + e*x)^n])/(3*g*(f + g*x)^3) - (b*e^3*n*Log[f + g*x])/(3*g*(e*f - d*g)^3)

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rule 2442

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[(f + g*
x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/(g*(q + 1))), x] - Dist[b*e*(n/(g*(q + 1))), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rubi steps \begin{align*} \text {integral}& = -\frac {a+b \log \left (c (d+e x)^n\right )}{3 g (f+g x)^3}+\frac {(b e n) \int \frac {1}{(d+e x) (f+g x)^3} \, dx}{3 g} \\ & = -\frac {a+b \log \left (c (d+e x)^n\right )}{3 g (f+g x)^3}+\frac {(b e n) \int \left (\frac {e^3}{(e f-d g)^3 (d+e x)}-\frac {g}{(e f-d g) (f+g x)^3}-\frac {e g}{(e f-d g)^2 (f+g x)^2}-\frac {e^2 g}{(e f-d g)^3 (f+g x)}\right ) \, dx}{3 g} \\ & = \frac {b e n}{6 g (e f-d g) (f+g x)^2}+\frac {b e^2 n}{3 g (e f-d g)^2 (f+g x)}+\frac {b e^3 n \log (d+e x)}{3 g (e f-d g)^3}-\frac {a+b \log \left (c (d+e x)^n\right )}{3 g (f+g x)^3}-\frac {b e^3 n \log (f+g x)}{3 g (e f-d g)^3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.09 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.78 \[ \int \frac {a+b \log \left (c (d+e x)^n\right )}{(f+g x)^4} \, dx=\frac {-2 \left (a+b \log \left (c (d+e x)^n\right )\right )+\frac {b e n (f+g x) \left ((e f-d g) (3 e f-d g+2 e g x)+2 e^2 (f+g x)^2 \log (d+e x)-2 e^2 (f+g x)^2 \log (f+g x)\right )}{(e f-d g)^3}}{6 g (f+g x)^3} \]

[In]

Integrate[(a + b*Log[c*(d + e*x)^n])/(f + g*x)^4,x]

[Out]

(-2*(a + b*Log[c*(d + e*x)^n]) + (b*e*n*(f + g*x)*((e*f - d*g)*(3*e*f - d*g + 2*e*g*x) + 2*e^2*(f + g*x)^2*Log
[d + e*x] - 2*e^2*(f + g*x)^2*Log[f + g*x]))/(e*f - d*g)^3)/(6*g*(f + g*x)^3)

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(454\) vs. \(2(134)=268\).

Time = 1.61 (sec) , antiderivative size = 455, normalized size of antiderivative = 3.23

method result size
parallelrisch \(-\frac {2 \ln \left (c \left (e x +d \right )^{n}\right ) b \,d^{3} e \,g^{5}-2 \ln \left (c \left (e x +d \right )^{n}\right ) b \,e^{4} f^{3} g^{2}+3 b \,e^{4} f^{3} g^{2} n -6 a \,d^{2} e^{2} f \,g^{4}+6 a d \,e^{3} f^{2} g^{3}+6 \ln \left (e x +d \right ) x^{2} b \,e^{4} f \,g^{4} n -6 \ln \left (g x +f \right ) x^{2} b \,e^{4} f \,g^{4} n +6 \ln \left (e x +d \right ) x b \,e^{4} f^{2} g^{3} n +2 x^{2} b \,e^{4} f \,g^{4} n +x b \,d^{2} e^{2} g^{5} n +5 x b \,e^{4} f^{2} g^{3} n -6 \ln \left (c \left (e x +d \right )^{n}\right ) b \,d^{2} e^{2} f \,g^{4}+6 \ln \left (c \left (e x +d \right )^{n}\right ) b d \,e^{3} f^{2} g^{3}+2 \ln \left (e x +d \right ) x^{3} b \,e^{4} g^{5} n -2 \ln \left (g x +f \right ) x^{3} b \,e^{4} g^{5} n +2 \ln \left (e x +d \right ) b \,e^{4} f^{3} g^{2} n -2 \ln \left (g x +f \right ) b \,e^{4} f^{3} g^{2} n +b \,d^{2} e^{2} f \,g^{4} n -4 b d \,e^{3} f^{2} g^{3} n +2 a \,d^{3} e \,g^{5}-2 a \,e^{4} f^{3} g^{2}-2 x^{2} b d \,e^{3} g^{5} n -6 \ln \left (g x +f \right ) x b \,e^{4} f^{2} g^{3} n -6 x b d \,e^{3} f \,g^{4} n}{6 \left (d^{3} g^{3}-3 d^{2} e f \,g^{2}+3 d \,e^{2} f^{2} g -e^{3} f^{3}\right ) \left (g x +f \right )^{3} g^{3} e}\) \(455\)
risch \(\text {Expression too large to display}\) \(950\)

[In]

int((a+b*ln(c*(e*x+d)^n))/(g*x+f)^4,x,method=_RETURNVERBOSE)

[Out]

-1/6*(2*ln(c*(e*x+d)^n)*b*d^3*e*g^5-2*ln(c*(e*x+d)^n)*b*e^4*f^3*g^2+3*b*e^4*f^3*g^2*n-6*a*d^2*e^2*f*g^4+6*a*d*
e^3*f^2*g^3+6*ln(e*x+d)*x^2*b*e^4*f*g^4*n-6*ln(g*x+f)*x^2*b*e^4*f*g^4*n+6*ln(e*x+d)*x*b*e^4*f^2*g^3*n+2*x^2*b*
e^4*f*g^4*n+x*b*d^2*e^2*g^5*n+5*x*b*e^4*f^2*g^3*n-6*ln(c*(e*x+d)^n)*b*d^2*e^2*f*g^4+6*ln(c*(e*x+d)^n)*b*d*e^3*
f^2*g^3+2*ln(e*x+d)*x^3*b*e^4*g^5*n-2*ln(g*x+f)*x^3*b*e^4*g^5*n+2*ln(e*x+d)*b*e^4*f^3*g^2*n-2*ln(g*x+f)*b*e^4*
f^3*g^2*n+b*d^2*e^2*f*g^4*n-4*b*d*e^3*f^2*g^3*n+2*a*d^3*e*g^5-2*a*e^4*f^3*g^2-2*x^2*b*d*e^3*g^5*n-6*ln(g*x+f)*
x*b*e^4*f^2*g^3*n-6*x*b*d*e^3*f*g^4*n)/(d^3*g^3-3*d^2*e*f*g^2+3*d*e^2*f^2*g-e^3*f^3)/(g*x+f)^3/g^3/e

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 507 vs. \(2 (131) = 262\).

Time = 0.32 (sec) , antiderivative size = 507, normalized size of antiderivative = 3.60 \[ \int \frac {a+b \log \left (c (d+e x)^n\right )}{(f+g x)^4} \, dx=-\frac {2 \, a e^{3} f^{3} - 6 \, a d e^{2} f^{2} g + 6 \, a d^{2} e f g^{2} - 2 \, a d^{3} g^{3} - 2 \, {\left (b e^{3} f g^{2} - b d e^{2} g^{3}\right )} n x^{2} - {\left (5 \, b e^{3} f^{2} g - 6 \, b d e^{2} f g^{2} + b d^{2} e g^{3}\right )} n x - {\left (3 \, b e^{3} f^{3} - 4 \, b d e^{2} f^{2} g + b d^{2} e f g^{2}\right )} n - 2 \, {\left (b e^{3} g^{3} n x^{3} + 3 \, b e^{3} f g^{2} n x^{2} + 3 \, b e^{3} f^{2} g n x + {\left (3 \, b d e^{2} f^{2} g - 3 \, b d^{2} e f g^{2} + b d^{3} g^{3}\right )} n\right )} \log \left (e x + d\right ) + 2 \, {\left (b e^{3} g^{3} n x^{3} + 3 \, b e^{3} f g^{2} n x^{2} + 3 \, b e^{3} f^{2} g n x + b e^{3} f^{3} n\right )} \log \left (g x + f\right ) + 2 \, {\left (b e^{3} f^{3} - 3 \, b d e^{2} f^{2} g + 3 \, b d^{2} e f g^{2} - b d^{3} g^{3}\right )} \log \left (c\right )}{6 \, {\left (e^{3} f^{6} g - 3 \, d e^{2} f^{5} g^{2} + 3 \, d^{2} e f^{4} g^{3} - d^{3} f^{3} g^{4} + {\left (e^{3} f^{3} g^{4} - 3 \, d e^{2} f^{2} g^{5} + 3 \, d^{2} e f g^{6} - d^{3} g^{7}\right )} x^{3} + 3 \, {\left (e^{3} f^{4} g^{3} - 3 \, d e^{2} f^{3} g^{4} + 3 \, d^{2} e f^{2} g^{5} - d^{3} f g^{6}\right )} x^{2} + 3 \, {\left (e^{3} f^{5} g^{2} - 3 \, d e^{2} f^{4} g^{3} + 3 \, d^{2} e f^{3} g^{4} - d^{3} f^{2} g^{5}\right )} x\right )}} \]

[In]

integrate((a+b*log(c*(e*x+d)^n))/(g*x+f)^4,x, algorithm="fricas")

[Out]

-1/6*(2*a*e^3*f^3 - 6*a*d*e^2*f^2*g + 6*a*d^2*e*f*g^2 - 2*a*d^3*g^3 - 2*(b*e^3*f*g^2 - b*d*e^2*g^3)*n*x^2 - (5
*b*e^3*f^2*g - 6*b*d*e^2*f*g^2 + b*d^2*e*g^3)*n*x - (3*b*e^3*f^3 - 4*b*d*e^2*f^2*g + b*d^2*e*f*g^2)*n - 2*(b*e
^3*g^3*n*x^3 + 3*b*e^3*f*g^2*n*x^2 + 3*b*e^3*f^2*g*n*x + (3*b*d*e^2*f^2*g - 3*b*d^2*e*f*g^2 + b*d^3*g^3)*n)*lo
g(e*x + d) + 2*(b*e^3*g^3*n*x^3 + 3*b*e^3*f*g^2*n*x^2 + 3*b*e^3*f^2*g*n*x + b*e^3*f^3*n)*log(g*x + f) + 2*(b*e
^3*f^3 - 3*b*d*e^2*f^2*g + 3*b*d^2*e*f*g^2 - b*d^3*g^3)*log(c))/(e^3*f^6*g - 3*d*e^2*f^5*g^2 + 3*d^2*e*f^4*g^3
 - d^3*f^3*g^4 + (e^3*f^3*g^4 - 3*d*e^2*f^2*g^5 + 3*d^2*e*f*g^6 - d^3*g^7)*x^3 + 3*(e^3*f^4*g^3 - 3*d*e^2*f^3*
g^4 + 3*d^2*e*f^2*g^5 - d^3*f*g^6)*x^2 + 3*(e^3*f^5*g^2 - 3*d*e^2*f^4*g^3 + 3*d^2*e*f^3*g^4 - d^3*f^2*g^5)*x)

Sympy [F(-2)]

Exception generated. \[ \int \frac {a+b \log \left (c (d+e x)^n\right )}{(f+g x)^4} \, dx=\text {Exception raised: HeuristicGCDFailed} \]

[In]

integrate((a+b*ln(c*(e*x+d)**n))/(g*x+f)**4,x)

[Out]

Exception raised: HeuristicGCDFailed >> no luck

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 301 vs. \(2 (131) = 262\).

Time = 0.21 (sec) , antiderivative size = 301, normalized size of antiderivative = 2.13 \[ \int \frac {a+b \log \left (c (d+e x)^n\right )}{(f+g x)^4} \, dx=\frac {1}{6} \, {\left (\frac {2 \, e^{2} \log \left (e x + d\right )}{e^{3} f^{3} g - 3 \, d e^{2} f^{2} g^{2} + 3 \, d^{2} e f g^{3} - d^{3} g^{4}} - \frac {2 \, e^{2} \log \left (g x + f\right )}{e^{3} f^{3} g - 3 \, d e^{2} f^{2} g^{2} + 3 \, d^{2} e f g^{3} - d^{3} g^{4}} + \frac {2 \, e g x + 3 \, e f - d g}{e^{2} f^{4} g - 2 \, d e f^{3} g^{2} + d^{2} f^{2} g^{3} + {\left (e^{2} f^{2} g^{3} - 2 \, d e f g^{4} + d^{2} g^{5}\right )} x^{2} + 2 \, {\left (e^{2} f^{3} g^{2} - 2 \, d e f^{2} g^{3} + d^{2} f g^{4}\right )} x}\right )} b e n - \frac {b \log \left ({\left (e x + d\right )}^{n} c\right )}{3 \, {\left (g^{4} x^{3} + 3 \, f g^{3} x^{2} + 3 \, f^{2} g^{2} x + f^{3} g\right )}} - \frac {a}{3 \, {\left (g^{4} x^{3} + 3 \, f g^{3} x^{2} + 3 \, f^{2} g^{2} x + f^{3} g\right )}} \]

[In]

integrate((a+b*log(c*(e*x+d)^n))/(g*x+f)^4,x, algorithm="maxima")

[Out]

1/6*(2*e^2*log(e*x + d)/(e^3*f^3*g - 3*d*e^2*f^2*g^2 + 3*d^2*e*f*g^3 - d^3*g^4) - 2*e^2*log(g*x + f)/(e^3*f^3*
g - 3*d*e^2*f^2*g^2 + 3*d^2*e*f*g^3 - d^3*g^4) + (2*e*g*x + 3*e*f - d*g)/(e^2*f^4*g - 2*d*e*f^3*g^2 + d^2*f^2*
g^3 + (e^2*f^2*g^3 - 2*d*e*f*g^4 + d^2*g^5)*x^2 + 2*(e^2*f^3*g^2 - 2*d*e*f^2*g^3 + d^2*f*g^4)*x))*b*e*n - 1/3*
b*log((e*x + d)^n*c)/(g^4*x^3 + 3*f*g^3*x^2 + 3*f^2*g^2*x + f^3*g) - 1/3*a/(g^4*x^3 + 3*f*g^3*x^2 + 3*f^2*g^2*
x + f^3*g)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 401 vs. \(2 (131) = 262\).

Time = 0.31 (sec) , antiderivative size = 401, normalized size of antiderivative = 2.84 \[ \int \frac {a+b \log \left (c (d+e x)^n\right )}{(f+g x)^4} \, dx=\frac {b e^{3} n \log \left (e x + d\right )}{3 \, {\left (e^{3} f^{3} g - 3 \, d e^{2} f^{2} g^{2} + 3 \, d^{2} e f g^{3} - d^{3} g^{4}\right )}} - \frac {b e^{3} n \log \left (g x + f\right )}{3 \, {\left (e^{3} f^{3} g - 3 \, d e^{2} f^{2} g^{2} + 3 \, d^{2} e f g^{3} - d^{3} g^{4}\right )}} - \frac {b n \log \left (e x + d\right )}{3 \, {\left (g^{4} x^{3} + 3 \, f g^{3} x^{2} + 3 \, f^{2} g^{2} x + f^{3} g\right )}} + \frac {2 \, b e^{2} g^{2} n x^{2} + 5 \, b e^{2} f g n x - b d e g^{2} n x + 3 \, b e^{2} f^{2} n - b d e f g n - 2 \, b e^{2} f^{2} \log \left (c\right ) + 4 \, b d e f g \log \left (c\right ) - 2 \, b d^{2} g^{2} \log \left (c\right ) - 2 \, a e^{2} f^{2} + 4 \, a d e f g - 2 \, a d^{2} g^{2}}{6 \, {\left (e^{2} f^{2} g^{4} x^{3} - 2 \, d e f g^{5} x^{3} + d^{2} g^{6} x^{3} + 3 \, e^{2} f^{3} g^{3} x^{2} - 6 \, d e f^{2} g^{4} x^{2} + 3 \, d^{2} f g^{5} x^{2} + 3 \, e^{2} f^{4} g^{2} x - 6 \, d e f^{3} g^{3} x + 3 \, d^{2} f^{2} g^{4} x + e^{2} f^{5} g - 2 \, d e f^{4} g^{2} + d^{2} f^{3} g^{3}\right )}} \]

[In]

integrate((a+b*log(c*(e*x+d)^n))/(g*x+f)^4,x, algorithm="giac")

[Out]

1/3*b*e^3*n*log(e*x + d)/(e^3*f^3*g - 3*d*e^2*f^2*g^2 + 3*d^2*e*f*g^3 - d^3*g^4) - 1/3*b*e^3*n*log(g*x + f)/(e
^3*f^3*g - 3*d*e^2*f^2*g^2 + 3*d^2*e*f*g^3 - d^3*g^4) - 1/3*b*n*log(e*x + d)/(g^4*x^3 + 3*f*g^3*x^2 + 3*f^2*g^
2*x + f^3*g) + 1/6*(2*b*e^2*g^2*n*x^2 + 5*b*e^2*f*g*n*x - b*d*e*g^2*n*x + 3*b*e^2*f^2*n - b*d*e*f*g*n - 2*b*e^
2*f^2*log(c) + 4*b*d*e*f*g*log(c) - 2*b*d^2*g^2*log(c) - 2*a*e^2*f^2 + 4*a*d*e*f*g - 2*a*d^2*g^2)/(e^2*f^2*g^4
*x^3 - 2*d*e*f*g^5*x^3 + d^2*g^6*x^3 + 3*e^2*f^3*g^3*x^2 - 6*d*e*f^2*g^4*x^2 + 3*d^2*f*g^5*x^2 + 3*e^2*f^4*g^2
*x - 6*d*e*f^3*g^3*x + 3*d^2*f^2*g^4*x + e^2*f^5*g - 2*d*e*f^4*g^2 + d^2*f^3*g^3)

Mupad [B] (verification not implemented)

Time = 1.19 (sec) , antiderivative size = 283, normalized size of antiderivative = 2.01 \[ \int \frac {a+b \log \left (c (d+e x)^n\right )}{(f+g x)^4} \, dx=\frac {2\,a\,d\,e\,f}{3\,{\left (f+g\,x\right )}^3\,{\left (d\,g-e\,f\right )}^2}-\frac {a\,d^2\,g}{3\,{\left (f+g\,x\right )}^3\,{\left (d\,g-e\,f\right )}^2}-\frac {b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )}{3\,g\,{\left (f+g\,x\right )}^3}-\frac {a\,e^2\,f^2}{3\,g\,{\left (f+g\,x\right )}^3\,{\left (d\,g-e\,f\right )}^2}+\frac {5\,b\,e^2\,f\,n\,x}{6\,{\left (f+g\,x\right )}^3\,{\left (d\,g-e\,f\right )}^2}+\frac {b\,e^2\,g\,n\,x^2}{3\,{\left (f+g\,x\right )}^3\,{\left (d\,g-e\,f\right )}^2}-\frac {b\,d\,e\,f\,n}{6\,{\left (f+g\,x\right )}^3\,{\left (d\,g-e\,f\right )}^2}+\frac {b\,e^2\,f^2\,n}{2\,g\,{\left (f+g\,x\right )}^3\,{\left (d\,g-e\,f\right )}^2}-\frac {b\,d\,e\,g\,n\,x}{6\,{\left (f+g\,x\right )}^3\,{\left (d\,g-e\,f\right )}^2}+\frac {b\,e^3\,n\,\mathrm {atan}\left (\frac {d\,g\,1{}\mathrm {i}+e\,f\,1{}\mathrm {i}+e\,g\,x\,2{}\mathrm {i}}{d\,g-e\,f}\right )\,2{}\mathrm {i}}{3\,g\,{\left (d\,g-e\,f\right )}^3} \]

[In]

int((a + b*log(c*(d + e*x)^n))/(f + g*x)^4,x)

[Out]

(2*a*d*e*f)/(3*(f + g*x)^3*(d*g - e*f)^2) - (a*d^2*g)/(3*(f + g*x)^3*(d*g - e*f)^2) - (b*log(c*(d + e*x)^n))/(
3*g*(f + g*x)^3) - (a*e^2*f^2)/(3*g*(f + g*x)^3*(d*g - e*f)^2) + (b*e^3*n*atan((d*g*1i + e*f*1i + e*g*x*2i)/(d
*g - e*f))*2i)/(3*g*(d*g - e*f)^3) + (5*b*e^2*f*n*x)/(6*(f + g*x)^3*(d*g - e*f)^2) + (b*e^2*g*n*x^2)/(3*(f + g
*x)^3*(d*g - e*f)^2) - (b*d*e*f*n)/(6*(f + g*x)^3*(d*g - e*f)^2) + (b*e^2*f^2*n)/(2*g*(f + g*x)^3*(d*g - e*f)^
2) - (b*d*e*g*n*x)/(6*(f + g*x)^3*(d*g - e*f)^2)